#include "els.h"
// #数组的创建和操作
int ELSAPI_chitu_chitu_array_create(els_VmObj* vm); // chitu_array_create(u:unit, len:int, init:num): ptr
int ELSAPI_chitu_chitu_array_free(els_VmObj* vm); // chitu_array_free(u:unit): 1
int ELSAPI_chitu_chitu_array_dataptr(els_VmObj* vm); // chitu_array_dataptr(u:unit): ptr
int ELSAPI_chitu_chitu_array_clear(els_VmObj* vm); // chitu_array_clear(u:unit): null
int ELSAPI_chitu_chitu_array_set(els_VmObj* vm); // chitu_array_set(u:unit, n:num): num
int ELSAPI_chitu_chitu_array_cat(els_VmObj* vm); // chitu_array_cat(a:unit, b:unit): int
int ELSAPI_chitu_chitu_array_slice(els_VmObj* vm); // chitu_array_slice(u:unit, start:int, end:int): unit
int ELSAPI_chitu_chitu_array_length(els_VmObj* vm); // chitu_array_length(u:unit): int
int ELSAPI_chitu_chitu_array_copy(els_VmObj* vm); // chitu_array_copy(u:unit): unit
int ELSAPI_chitu_chitu_array_get(els_VmObj* vm); // chitu_array_get(u:unit, i:int)
int ELSAPI_chitu_chitu_array_insert(els_VmObj* vm); // chitu_array_insert(u:unit, i:int, d:double)
int ELSAPI_chitu_chitu_array_print(els_VmObj* vm); // chitu_array_print(u:unit)
// #自定义运算
int ELSAPI_chitu_chitu_array_cfunct(els_VmObj* vm); // chitu_array_cfunct(u:unit, f:ptr): unit
int ELSAPI_chitu_chitu_array_lsfunct(els_VmObj* vm); // chitu_array_lsfunct(u:unit, f:ptr): unit
// #四则运算
int ELSAPI_chitu_chitu_array_plus(els_VmObj* vm); // chitu_array_plus(u:unit, n:num): unit
int ELSAPI_chitu_chitu_array_minus(els_VmObj* vm); // chitu_array_minus(u:unit, n:num): unit
int ELSAPI_chitu_chitu_array_mutiplys(els_VmObj* vm); // chitu_array_mutiplys(u:unit, n:num): unit
int ELSAPI_chitu_chitu_array_divide(els_VmObj* vm); // chitu_array_divide(u:unit. n:num): unit
// #取模
int ELSAPI_chitu_chitu_array_mod(els_VmObj* vm); // chitu_array_mod(u:unit, n:num): unit
// #指数运算
int ELSAPI_chitu_chitu_array_squre(els_VmObj* vm); // chitu_array_squre(u:unit): unit
int ELSAPI_chitu_chitu_array_sqrt(els_VmObj* vm); // chitu_array_sqrt(u:unit): unit
int ELSAPI_chitu_chitu_array_cube(els_VmObj* vm); // chitu_array_cube(u:unit): unit
int ELSAPI_chitu_chitu_array_cbrt(els_VmObj* vm); // chitu_array_cbrt(u:unit): unit
int ELSAPI_chitu_chitu_array_pow(els_VmObj* vm); // chitu_array_pow(u:unit, n:num): unit
// #杂项
int ELSAPI_chitu_chitu_array_sum(els_VmObj* vm); // chitu_array_sum(u:unit)
int ELSAPI_chitu_chitu_array_even(els_VmObj* vm); // chitu_array_even(u:unit)
int ELSAPI_chitu_chitu_array_variance(els_VmObj* vm); // chitu_array_variance(u:unit)
int ELSAPI_chitu_chitu_array_standard_deviation(els_VmObj* vm); // chitu_array_standard_deviation(u:unit)
int ELSAPI_chitu_chitu_array_max(els_VmObj* vm); // chitu_array_max(u:unit): number
int ELSAPI_chitu_chitu_array_min(els_VmObj* vm); // chitu_array_min(u:unit): number
// #排序
int ELSAPI_chitu_chitu_array_sort(els_VmObj* vm); // chitu_array_sort(u:unit): unit
int ELSAPI_chitu_chitu_array_reverse(els_VmObj* vm); // chitu_array_reverse(u:unit): unit
// #随机函数
int ELSAPI_chitu_chitu_array_srand(els_VmObj* vm); // chitu_array_srand(u:unit, seed:number): unit
int ELSAPI_chitu_chitu_array_random(els_VmObj* vm); // chitu_array_random(u:unit): unit
int ELSAPI_chitu_chitu_array_randint(els_VmObj* vm); // chitu_array_randint(u:unit, start:int, end:int): unit
int ELSAPI_chitu_chitu_array_randfloat(els_VmObj* vm); // chitu_array_randfloat(u:unit, start:num, end:num): unit
int ELSAPI_chitu_chitu_array_choice(els_VmObj* vm); // chitu_array_choice(u:unit): unit
// #类型转化
int ELSAPI_chitu_chitu_array_tounit(els_VmObj* vm); // chitu_array_tounit(u:unit): unit
int ELSAPI_chitu_chitu_array_fromunit(els_VmObj* vm); // chitu_array_fromunit(u:unit, unit): unit
#ifdef ELS_CONF_TOKEN_EN
static const char LibScript[]={
-27,-68,-107,40,39,115,116,100,108,105,98,39,41,10,
10,
-24,-75,-92,-27,-123,-108,32,61,32,123,125,10,
10,
-24,-75,-92,-27,-123,-108,46,-26,-101,-76,-26,-108,-71,-23,-102,-113,-26,-100,-70,-26,-107,-80,-25,-89,-115,-27,-83,-112,32,61,32,99,104,105,116,117,95,97,114,114,97,121,95,115,114,97,110,100,10,
10,
-26,-106,-71,-26,-77,-107,32,-24,-75,-92,-27,-123,-108,46,-27,-120,-101,-27,-69,-70,-26,-107,-80,-25,-69,-124,40,-23,-107,-65,-27,-70,-90,44,32,-27,-120,-99,-27,-89,-117,-27,-128,-68,41,58,10,
32,32,32,32,-28,-69,-92,32,-26,-106,-80,-27,-81,-71,-24,-79,-95,32,61,32,123,125,10,
32,32,32,32,-23,-107,-65,-27,-70,-90,32,61,32,-23,-107,-65,-27,-70,-90,32,-26,-120,-106,32,48,10,
32,32,32,32,-27,-120,-99,-27,-89,-117,-27,-128,-68,32,61,32,-27,-120,-99,-27,-89,-117,-27,-128,-68,32,-26,-120,-106,32,48,10,
10,
32,32,32,32,99,104,105,116,117,95,97,114,114,97,121,95,99,114,101,97,116,101,40,-26,-106,-80,-27,-81,-71,-24,-79,-95,44,32,-23,-107,-65,-27,-70,-90,44,32,-27,-120,-99,-27,-89,-117,-27,-128,-68,41,10,
10,
32,32,32,32,-26,-106,-80,-27,-81,-71,-24,-79,-95,46,-27,-120,-96,-23,-103,-92,32,61,32,99,104,105,116,117,95,97,114,114,97,121,95,102,114,101,101,10,
32,32,32,32,-26,-106,-80,-27,-81,-71,-24,-79,-95,46,-23,-107,-65,-27,-70,-90,32,61,32,99,104,105,116,117,95,97,114,114,97,121,95,108,101,110,103,116,104,10,
32,32,32,32,-26,-106,-80,-27,-81,-71,-24,-79,-95,46,-25,-76,-94,-27,-68,-107,32,61,32,99,104,105,116,117,95,97,114,114,97,121,95,103,101,116,10,
32,32,32,32,-26,-106,-80,-27,-81,-71,-24,-79,-95,46,-26,-113,-110,-27,-123,-91,32,61,32,99,104,105,116,117,95,97,114,114,97,121,95,105,110,115,101,114,116,10,
32,32,32,32,-26,-106,-80,-27,-81,-71,-24,-79,-95,46,-26,-107,-80,-26,-115,-82,-26,-116,-121,-23,-110,-120,32,61,32,99,104,105,116,117,95,97,114,114,97,121,95,100,97,116,97,112,116,114,10,
32,32,32,32,-26,-106,-80,-27,-81,-71,-24,-79,-95,46,-26,-72,-123,-25,-87,-70,32,61,32,99,104,105,116,117,95,97,114,114,97,121,95,99,108,101,97,114,10,
32,32,32,32,-26,-106,-80,-27,-81,-71,-24,-79,-95,46,-24,-82,-66,-25,-67,-82,32,61,32,99,104,105,116,117,95,97,114,114,97,121,95,115,101,116,10,
32,32,32,32,-26,-106,-80,-27,-81,-71,-24,-79,-95,46,-26,-117,-68,-26,-114,-91,32,61,32,99,104,105,116,117,95,97,114,114,97,121,95,99,97,116,10,
32,32,32,32,-26,-106,-80,-27,-81,-71,-24,-79,-95,46,-26,-119,-109,-27,-115,-80,32,61,32,99,104,105,116,117,95,97,114,114,97,121,95,112,114,105,110,116,10,
10,
32,32,32,32,-26,-106,-71,-26,-77,-107,32,-26,-106,-80,-27,-81,-71,-24,-79,-95,46,-27,-92,-115,-27,-120,-74,40,41,58,10,
32,32,32,32,32,32,32,32,-28,-69,-92,32,-27,-92,-115,-27,-120,-74,-27,-112,-114,-27,-81,-71,-24,-79,-95,32,61,32,-24,-75,-92,-27,-123,-108,46,-27,-120,-101,-27,-69,-70,-26,-107,-80,-25,-69,-124,40,41,10,
32,32,32,32,32,32,32,32,-27,-92,-115,-27,-120,-74,-27,-112,-114,-27,-81,-71,-24,-79,-95,46,95,95,112,116,114,95,95,32,61,32,99,104,105,116,117,95,97,114,114,97,121,95,99,111,112,121,40,-26,-83,-92,41,10,
32,32,32,32,32,32,32,32,-27,-101,-98,32,-27,-92,-115,-27,-120,-74,-27,-112,-114,-27,-81,-71,-24,-79,-95,10,
32,32,32,32,59,10,
10,
32,32,32,32,-26,-106,-71,-26,-77,-107,32,-26,-106,-80,-27,-81,-71,-24,-79,-95,46,-27,-120,-121,-25,-119,-121,40,-27,-68,-128,-27,-89,-117,44,32,-25,-69,-109,-26,-99,-97,41,58,10,
32,32,32,32,32,32,32,32,-28,-69,-92,32,-27,-120,-121,-25,-119,-121,-27,-112,-114,-27,-81,-71,-24,-79,-95,32,61,32,-24,-75,-92,-27,-123,-108,46,-27,-120,-101,-27,-69,-70,-26,-107,-80,-25,-69,-124,40,41,10,
32,32,32,32,32,32,32,32,-28,-69,-92,32,-26,-106,-80,-26,-116,-121,-23,-110,-120,32,61,32,99,104,105,116,117,95,97,114,114,97,121,95,115,108,105,99,101,40,-26,-83,-92,44,32,-27,-68,-128,-27,-89,-117,44,32,-25,-69,-109,-26,-99,-97,41,10,
32,32,32,32,32,32,32,32,-27,-120,-121,-25,-119,-121,-27,-112,-114,-27,-81,-71,-24,-79,-95,46,-27,-120,-96,-23,-103,-92,40,41,10,
10,
32,32,32,32,32,32,32,32,-27,-90,-126,-26,-98,-100,32,-26,-106,-80,-26,-116,-121,-23,-110,-120,58,10,
32,32,32,32,32,32,32,32,32,32,32,32,-27,-120,-121,-25,-119,-121,-27,-112,-114,-27,-81,-71,-24,-79,-95,46,95,95,112,116,114,95,95,32,61,32,-26,-106,-80,-26,-116,-121,-23,-110,-120,10,
32,32,32,32,32,32,32,32,-27,-112,-90,-27,-120,-103,10,
32,32,32,32,32,32,32,32,32,32,32,32,-27,-120,-121,-25,-119,-121,-27,-112,-114,-27,-81,-71,-24,-79,-95,32,61,32,-25,-87,-70,10,
32,32,32,32,32,32,32,32,59,10,
10,
32,32,32,32,32,32,32,32,-27,-101,-98,32,-27,-120,-121,-25,-119,-121,-27,-112,-114,-27,-81,-71,-24,-79,-95,10,
32,32,32,32,59,10,
10,
32,32,32,32,-26,-106,-80,-27,-81,-71,-24,-79,-95,46,-24,-80,-125,-25,-108,-88,67,-27,-121,-67,-26,-107,-80,32,61,32,99,104,105,116,117,95,97,114,114,97,121,95,99,102,117,110,99,116,10,
10,
32,32,32,32,-26,-106,-80,-27,-81,-71,-24,-79,-95,46,-27,-118,-96,32,61,32,99,104,105,116,117,95,97,114,114,97,121,95,112,108,117,115,10,
32,32,32,32,-26,-106,-80,-27,-81,-71,-24,-79,-95,46,-27,-121,-113,32,61,32,99,104,105,116,117,95,97,114,114,97,121,95,109,105,110,117,115,32,10,
32,32,32,32,-26,-106,-80,-27,-81,-71,-24,-79,-95,46,-28,-71,-104,32,61,32,99,104,105,116,117,95,97,114,114,97,121,95,109,117,116,105,112,108,121,115,10,
32,32,32,32,-26,-106,-80,-27,-81,-71,-24,-79,-95,46,-23,-103,-92,32,61,32,99,104,105,116,117,95,97,114,114,97,121,95,100,105,118,105,100,101,10,
32,32,32,32,-26,-106,-80,-27,-81,-71,-24,-79,-95,46,-27,-113,-106,-26,-88,-95,32,61,32,99,104,105,116,117,95,97,114,114,97,121,95,109,111,100,10,
32,32,32,32,-26,-106,-80,-27,-81,-71,-24,-79,-95,46,-27,-71,-77,-26,-106,-71,32,61,32,99,104,105,116,117,95,97,114,114,97,121,95,115,113,117,114,101,10,
32,32,32,32,-26,-106,-80,-27,-81,-71,-24,-79,-95,46,-27,-68,-128,-27,-71,-77,-26,-106,-71,32,61,32,99,104,105,116,117,95,97,114,114,97,121,95,115,113,114,116,10,
32,32,32,32,-26,-106,-80,-27,-81,-71,-24,-79,-95,46,-25,-85,-117,-26,-106,-71,32,61,32,99,104,105,116,117,95,97,114,114,97,121,95,99,117,98,101,10,
32,32,32,32,-26,-106,-80,-27,-81,-71,-24,-79,-95,46,-27,-68,-128,-25,-85,-117,-26,-106,-71,32,61,32,99,104,105,116,117,95,97,114,114,97,121,95,99,98,114,116,10,
10,
32,32,32,32,-26,-106,-80,-27,-81,-71,-24,-79,-95,46,-26,-79,-126,-27,-110,-116,32,61,32,99,104,105,116,117,95,97,114,114,97,121,95,115,117,109,10,
32,32,32,32,-26,-106,-80,-27,-81,-71,-24,-79,-95,46,-26,-79,-126,-27,-71,-77,-27,-99,-121,-26,-107,-80,32,61,32,99,104,105,116,117,95,97,114,114,97,121,95,101,118,101,110,10,
32,32,32,32,-26,-106,-80,-27,-81,-71,-24,-79,-95,46,-26,-79,-126,-26,-106,-71,-27,-73,-82,32,61,32,99,104,105,116,117,95,97,114,114,97,121,95,118,97,114,105,97,110,99,101,10,
32,32,32,32,-26,-106,-80,-27,-81,-71,-24,-79,-95,46,-26,-79,-126,-26,-96,-121,-27,-121,-122,-27,-73,-82,32,61,32,99,104,105,116,117,95,97,114,114,97,121,95,115,116,97,110,100,97,114,100,95,100,101,118,105,97,116,105,111,110,10,
32,32,32,32,-26,-106,-80,-27,-81,-71,-24,-79,-95,46,-26,-79,-126,-26,-100,-128,-27,-92,-89,-27,-128,-68,32,61,32,99,104,105,116,117,95,97,114,114,97,121,95,109,97,120,10,
32,32,32,32,-26,-106,-80,-27,-81,-71,-24,-79,-95,46,-26,-79,-126,-26,-100,-128,-27,-80,-113,-27,-128,-68,32,61,32,99,104,105,116,117,95,97,114,114,97,121,95,109,105,110,10,
10,
32,32,32,32,-26,-106,-80,-27,-81,-71,-24,-79,-95,46,-26,-114,-110,-27,-70,-113,32,61,32,99,104,105,116,117,95,97,114,114,97,121,95,115,111,114,116,10,
32,32,32,32,-26,-106,-80,-27,-81,-71,-24,-79,-95,46,-27,-128,-110,-25,-67,-82,32,61,32,99,104,105,116,117,95,97,114,114,97,121,95,114,101,118,101,114,115,101,10,
10,
32,32,32,32,-26,-106,-80,-27,-81,-71,-24,-79,-95,46,-27,-95,-85,-27,-123,-123,-23,-102,-113,-26,-100,-70,-26,-107,-80,32,61,32,99,104,105,116,117,95,97,114,114,97,121,95,114,97,110,100,111,109,10,
32,32,32,32,-26,-106,-80,-27,-81,-71,-24,-79,-95,46,-27,-95,-85,-27,-123,-123,-23,-102,-113,-26,-100,-70,-26,-107,-76,-26,-107,-80,32,61,32,99,104,105,116,117,95,97,114,114,97,121,95,114,97,110,100,105,110,116,10,
32,32,32,32,-26,-106,-80,-27,-81,-71,-24,-79,-95,46,-27,-95,-85,-27,-123,-123,-23,-102,-113,-26,-100,-70,-27,-82,-98,-26,-107,-80,32,61,32,99,104,105,116,117,95,97,114,114,97,121,95,114,97,110,100,102,108,111,97,116,10,
32,32,32,32,-26,-106,-80,-27,-81,-71,-24,-79,-95,46,-23,-102,-113,-26,-100,-70,-23,-128,-119,-26,-117,-87,32,61,32,99,104,105,116,117,95,97,114,114,97,121,95,99,104,111,105,99,101,10,
10,
32,32,32,32,-26,-106,-80,-27,-81,-71,-24,-79,-95,91,34,58,58,43,34,93,32,61,32,-26,-106,-80,-27,-81,-71,-24,-79,-95,46,-27,-118,-96,10,
32,32,32,32,-26,-106,-80,-27,-81,-71,-24,-79,-95,91,34,58,58,45,34,93,32,61,32,-26,-106,-80,-27,-81,-71,-24,-79,-95,46,-27,-121,-113,10,
32,32,32,32,-26,-106,-80,-27,-81,-71,-24,-79,-95,91,34,58,58,42,34,93,32,61,32,-26,-106,-80,-27,-81,-71,-24,-79,-95,46,-28,-71,-104,10,
32,32,32,32,-26,-106,-80,-27,-81,-71,-24,-79,-95,91,34,58,58,47,34,93,32,61,32,-26,-106,-80,-27,-81,-71,-24,-79,-95,46,-23,-103,-92,10,
32,32,32,32,-26,-106,-80,-27,-81,-71,-24,-79,-95,91,34,58,58,94,34,93,32,61,32,-26,-106,-80,-27,-81,-71,-24,-79,-95,46,-28,-71,-104,-26,-77,-107,10,
32,32,32,32,-26,-106,-80,-27,-81,-71,-24,-79,-95,91,34,58,58,38,34,93,32,61,32,-26,-106,-80,-27,-81,-71,-24,-79,-95,46,-26,-117,-68,-26,-114,-91,10,
10,
32,32,32,32,-26,-106,-80,-27,-81,-71,-24,-79,-95,46,-24,-67,-84,-27,-116,-106,-28,-72,-70,-27,-115,-107,-27,-123,-125,32,61,32,99,104,105,116,117,95,97,114,114,97,121,95,116,111,117,110,105,116,10,
10,
32,32,32,32,-27,-101,-98,32,-26,-106,-80,-27,-81,-71,-24,-79,-95,10,
59,10,
10,
-24,-75,-92,-27,-123,-108,46,-26,-101,-76,-26,-108,-71,-23,-102,-113,-26,-100,-70,-26,-107,-80,-25,-89,-115,-27,-83,-112,40,40,-26,-105,-74,-23,-105,-76,46,-25,-89,-110,40,41,32,43,32,-26,-105,-74,-23,-105,-76,46,-24,-82,-95,-26,-105,-74,40,41,41,32,94,32,51,41,10,
10,
0};
#endif
void ElsLib_chitu_libinit(els_VmObj *vm){
	vm_register(vm,"chitu_array_sum",ELSAPI_chitu_chitu_array_sum);
	vm_register(vm,"chitu_array_sqrt",ELSAPI_chitu_chitu_array_sqrt);
	vm_register(vm,"chitu_array_mod",ELSAPI_chitu_chitu_array_mod);
	vm_register(vm,"chitu_array_free",ELSAPI_chitu_chitu_array_free);
	vm_register(vm,"chitu_array_random",ELSAPI_chitu_chitu_array_random);
	vm_register(vm,"chitu_array_cbrt",ELSAPI_chitu_chitu_array_cbrt);
	vm_register(vm,"chitu_array_plus",ELSAPI_chitu_chitu_array_plus);
	vm_register(vm,"chitu_array_cfunct",ELSAPI_chitu_chitu_array_cfunct);
	vm_register(vm,"chitu_array_pow",ELSAPI_chitu_chitu_array_pow);
	vm_register(vm,"chitu_array_lsfunct",ELSAPI_chitu_chitu_array_lsfunct);
	vm_register(vm,"chitu_array_print",ELSAPI_chitu_chitu_array_print);
	vm_register(vm,"chitu_array_insert",ELSAPI_chitu_chitu_array_insert);
	vm_register(vm,"chitu_array_fromunit",ELSAPI_chitu_chitu_array_fromunit);
	vm_register(vm,"chitu_array_minus",ELSAPI_chitu_chitu_array_minus);
	vm_register(vm,"chitu_array_create",ELSAPI_chitu_chitu_array_create);
	vm_register(vm,"chitu_array_cat",ELSAPI_chitu_chitu_array_cat);
	vm_register(vm,"chitu_array_choice",ELSAPI_chitu_chitu_array_choice);
	vm_register(vm,"chitu_array_copy",ELSAPI_chitu_chitu_array_copy);
	vm_register(vm,"chitu_array_clear",ELSAPI_chitu_chitu_array_clear);
	vm_register(vm,"chitu_array_srand",ELSAPI_chitu_chitu_array_srand);
	vm_register(vm,"chitu_array_set",ELSAPI_chitu_chitu_array_set);
	vm_register(vm,"chitu_array_tounit",ELSAPI_chitu_chitu_array_tounit);
	vm_register(vm,"chitu_array_squre",ELSAPI_chitu_chitu_array_squre);
	vm_register(vm,"chitu_array_randfloat",ELSAPI_chitu_chitu_array_randfloat);
	vm_register(vm,"chitu_array_randint",ELSAPI_chitu_chitu_array_randint);
	vm_register(vm,"chitu_array_reverse",ELSAPI_chitu_chitu_array_reverse);
	vm_register(vm,"chitu_array_slice",ELSAPI_chitu_chitu_array_slice);
	vm_register(vm,"chitu_array_sort",ELSAPI_chitu_chitu_array_sort);
	vm_register(vm,"chitu_array_get",ELSAPI_chitu_chitu_array_get);
	vm_register(vm,"chitu_array_max",ELSAPI_chitu_chitu_array_max);
	vm_register(vm,"chitu_array_variance",ELSAPI_chitu_chitu_array_variance);
	vm_register(vm,"chitu_array_length",ELSAPI_chitu_chitu_array_length);
	vm_register(vm,"chitu_array_dataptr",ELSAPI_chitu_chitu_array_dataptr);
	vm_register(vm,"chitu_array_cube",ELSAPI_chitu_chitu_array_cube);
	vm_register(vm,"chitu_array_even",ELSAPI_chitu_chitu_array_even);
	vm_register(vm,"chitu_array_divide",ELSAPI_chitu_chitu_array_divide);
	vm_register(vm,"chitu_array_mutiplys",ELSAPI_chitu_chitu_array_mutiplys);
	vm_register(vm,"chitu_array_min",ELSAPI_chitu_chitu_array_min);
	vm_register(vm,"chitu_array_standard_deviation",ELSAPI_chitu_chitu_array_standard_deviation);
	#ifdef ELS_CONF_TOKEN_EN
		vm_dostring(vm,LibScript);
	#endif
};
